package com.yunwaikeji.gy_tool_library.utils.http;

import com.yunwaikeji.gy_tool_library.utils.file.GYFileLoadListener;

import java.io.File;
import java.net.HttpURLConnection;

public class GYHttpFileBuilder {
    private String urlName;//请求名称
    private File file;//文件
    private String fileName = "";//文件名称
    private long nowBytes;//当前大小
    private long totalBytes;//总计大小
    private long secondBytes;//速度
    private GYFileLoadListener fileLoadListener;
    private GYHttpListener<HttpURLConnection> httpListener;

    public String getUrlName() {
        return urlName;
    }

    public GYHttpFileBuilder setUrlName(String urlName) {
        this.urlName = urlName;
        return this;
    }

    public File getFile() {
        return file;
    }

    public GYHttpFileBuilder setFile(File file) {
        this.file = file;
        return this;
    }

    public String getFileName() {
        return fileName;
    }

    public GYHttpFileBuilder setFileName(String fileName) {
        this.fileName = fileName;
        return this;
    }

    public long getNowBytes() {
        return nowBytes;
    }

    public GYHttpFileBuilder setNowBytes(long nowBytes) {
        this.nowBytes = nowBytes;
        return this;
    }

    public GYFileLoadListener getFileLoadListener() {
        return fileLoadListener;
    }

    public GYHttpFileBuilder setFileLoadListener(GYFileLoadListener fileLoadListener) {
        this.fileLoadListener = fileLoadListener;
        return this;
    }

    public long getTotalBytes() {
        return totalBytes;
    }

    public GYHttpFileBuilder setTotalBytes(long totalBytes) {
        this.totalBytes = totalBytes;
        return this;
    }

    public long getSecondBytes() {
        return secondBytes;
    }

    public GYHttpFileBuilder setSecondBytes(long secondBytes) {
        this.secondBytes = secondBytes;
        return this;
    }

    public GYHttpListener<HttpURLConnection> getHttpListener() {
        return httpListener;
    }

    public GYHttpFileBuilder setHttpListener(GYHttpListener<HttpURLConnection> httpListener) {
        this.httpListener = httpListener;
        return this;
    }
}
